<%@page import="com.lele.pojo.Book"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>书籍信息列表</title>
</head>
<body bgcolor="yellow">
	<div align="center">
 	<h1>书籍信息管理</h1>
	<div class = "content">
		<div class = "box" style="marign:0 auto; width="50%"">
			<table  border="2" cellspacing="0" style="text-align:center;">
				<tr>
					<th><h2>标题</h2></th>
					<th><h2>作者</h2></th>
					<th><h2>出版社</h2></th>
					<th><h2>价格</h2></th>
					<th><h2>操作</h2></th>
				</tr>
			<%
			List<Book> list=(List)request.getAttribute("list");
			for(Book b : list){
				%>
				<tr>
					<td><%=b.getTitle() %></td>
					<td><%=b.getAuthor() %></td>
					<td><%=b.getPublisher() %></td>
					<td><%=b.getPrice() %></td>
					<td>
						<a href = "delete.jsp?bookid=<%=b.getBookid() %>&title=<%=b.getTitle() %>">删除</a>
						<a href = "selectBookById?bookid=<%=b.getBookid() %>">修改</a>
					</td>
					
				</tr>
				<%			
			}
			%>
			</table>
			<br>
			<div class = item>
				<form action="add.jsp">
					<input type="submit" value=添加书籍>
				</form>
			</div>
		</div>
	</div>
	</div>
</body>
</html>
